home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha Extra 2004 January / CyberMycha Extra 1-2004 (Poland) (Disc 2).bin / Pippi / gmdl.dir / Internal_45_water.ls < prev    next >
Encoding:
Text File  |  2001-09-04  |  1.1 KB  |  48 lines

  1. property meSprite, mePlayT, mePlayA
  2. global gmObject, sndObject
  3.  
  4. on beginSprite me
  5.   mePlayT = 0
  6.   mePlayA = 0
  7.   meSprite = sprite(me.spriteNum)
  8.   gmObject.water = meSprite
  9.   meSprite.frame = 1
  10. end
  11.  
  12. on exitFrame me
  13.   if meSprite.frame = meSprite.member.frameCount then
  14.     if meSprite.locV < 600 then
  15.       mePlayT = 0
  16.       mePlayA = 0
  17.       meSprite.stop()
  18.       meSprite.frame = 1
  19.       meSprite.loc = point(400, 800)
  20.       updateStage()
  21.     end if
  22.   else
  23.     if meSprite.frame = 2 then
  24.       A = gmObject.tommy.loc[1]
  25.       b = gmObject.annika.loc[1]
  26.       c = meSprite.loc[1]
  27.       if ((A - c) < 45) and ((A - c) > -45) then
  28.         if mePlayT = 0 then
  29.           gmObject.tommy.getWet()
  30.           if gmObject.tommy.dead = 0 then
  31.             sndObject.respondSnd(4, 6)
  32.           end if
  33.           mePlayT = 1
  34.         end if
  35.       end if
  36.       if ((b - c) < 45) and ((b - c) > -45) then
  37.         if mePlayA = 0 then
  38.           gmObject.annika.getWet()
  39.           if gmObject.annika.dead = 0 then
  40.             sndObject.respondSnd(4, 7)
  41.           end if
  42.           mePlayA = 1
  43.         end if
  44.       end if
  45.     end if
  46.   end if
  47. end
  48.